const TokenKey = 'uni_token';
 const UserKey = 'uni_user'
// 认证令牌
export function getToken() {
	return uni.getStorageSync(TokenKey)
}
 
export function setToken(token) {
	return uni.setStorageSync(TokenKey, token)
}

// 获取用户信息 
export function getUser() { 
	return JSON.parse(uni.setStorageSync(UserKey)) 
}
//保存用户信息 
export function setUser(user) {
 	uni.setStorageSync(UserKey, JSON.stringify(user)) 
}
 
export function removeToken() {
	uni.removeStorageSync(UserKey)
	return uni.removeStorageSync(TokenKey)
}
